Skip to content

Conversation

@sigurdm
Copy link
Contributor

@sigurdm sigurdm commented Nov 7, 2025

(adapted from https://github.com/dart-lang/pub/blob/master/test/golden_file.dart)

With this:

  • golden files gets their name from the running test automatically
  • there is a concept of multiple sections in a golden file
  • you can update the golden files by running the tests with _WRITE_GOLDENS=TRUE.
  • You can run a command, and have the command, stdout, stderr and exit code all included in the golden file.
    • and have specific expectation machers on those at the same time
  • missing golden files cause an error on CI.

@sigurdm sigurdm requested a review from isoos November 7, 2025 13:20
@isoos
Copy link
Collaborator

isoos commented Nov 7, 2025

While the filenames with spaces are probably a non-issue, shouldn't we rather have - or _ instead of spaces?

@sigurdm
Copy link
Contributor Author

sigurdm commented Nov 10, 2025

While the filenames with spaces are probably a non-issue, shouldn't we rather have - or _ instead of spaces?

Possibly. The spaces have caused no problem in the pub client...

@isoos
Copy link
Collaborator

isoos commented Nov 10, 2025

Possibly. The spaces have caused no problem in the pub client...

I'm not worried about problems, more about consistency... to me these filenames feel a bit off compared to the rest, where we don't use spaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants